<?php
declare (strict_types = 1);

namespace app\common\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Subscribe extends Model
{
    //  连接数据库
    protected $connection = 'hospital';
    //  连接表名
    protected $name = 'subscribe';
    //  自动写入时间戳字段
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';

    // 关联 classify
    public function classify()
    {
        return $this->hasOne(Classify::class, 'id', 'classify_id');
    }
}
